10. Solution: Java Linker

Solution: Java Linker

ND079 JPND C3 L3 A08 Solution JLinker

Create a jar using:

mvn clean package

Check the dependencies of the generated jar with jdeps:

jdeps target/gcd-1.0-SNAPSHOT.jar

Create a custom JRE to run this jar:

jlink --module-path "$JAVA_HOME/jmods" --module-path target/classes --add-modules com.udacity.gcd --output tinyJRE

Check the size of this image:

du -sh tinyJRE

Try running the jar with the custom image.

tinyJRE/bin/java -jar target/gcd-1.0-SNAPSHOT.jar